package com.sky.controller.user;


import com.sky.entity.SetmealDish;
import com.sky.result.Result;
import com.sky.service.ISetmealDishService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 套餐菜品关系 前端控制器
 * </p>
 *
 * @author fcy
 * @since 2025-09-11
 */
@RestController("userSetmealDishController")
@RequestMapping("/user/setmeal/dish")
@Api(tags = "C端套餐菜品关系接口")
public class SetmealDishController {
    @Autowired
    private ISetmealDishService setmealDishService;
    @RequestMapping("/{id}")
    @ApiOperation("根据套餐id查询包含的菜品")
    public Result<List<SetmealDish>> list(@PathVariable Integer id) {
        List<SetmealDish> list = setmealDishService.getList(id);
        return Result.success(list);
    }
}
